﻿using System;

namespace Micro.Srv.LogCenter
{
    public class ChainLogViewModel
    {
        public string Id { get; set; }

        public string Index { get; set; }

        /// <summary>
        /// 日志级别
        /// </summary>
        public string LogLevel { get; set; }

        /// <summary>
        /// 日志类型
        /// </summary>
        public string LogType { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string Exception { get; set; }

        /// <summary>
        /// 主机IP
        /// </summary>
        public string HostIPAddress { get; set; }

        /// <summary>
        /// 应用程序Id
        /// </summary>
        public string ApplicationId { get; set; }

        /// <summary>
        /// 日志
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 日志记录时间
        /// </summary>
        public DateTime LogTime { get; set; }

        /// <summary>
        /// 链路Id
        /// </summary>
        public string ChainId { get; set; }

        /// <summary>
        /// 追踪ID
        /// </summary>
        public string TrackId { get; set; }

        /// <summary>
        /// 父级追踪Id
        /// </summary>
        public string ParentTrackId { get; set; }

        public RequestViewModel Request { get; set; }

        public ResponseViewModel Response { get; set; }

        public int TimeSpan { get; set; }

        public int ProgressTimeSpan { get; set; }

        public ChainLogViewModel[] Children { get; set; }
    }

    public class RequestViewModel
    {
        public string Path { get; set; }
        public string Method { get; set; }
    }

    public class ResponseViewModel
    {
        public int StatusCode { get; set; }
    }
}
